﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="Group.cs" company="">
//   
// </copyright>
// <summary>
//   Defines the Group type.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace devMobile.Controls
{
    /// <summary>
    /// </summary>
    /// <typeparam name="T">
    /// </typeparam>
    internal class Group<T> 
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="Group{T}"/> class.
        /// </summary>
        /// <param name="name">
        /// The name.
        /// </param>
        /// <param name="items">
        /// The items.
        /// </param>
        public Group(string name, int items)
        {
            this.Title = name;
            this.Items = items;
        }

        /// <summary>
        /// </summary>
        /// <param name="obj">
        /// The obj.
        /// </param>
        /// <returns>
        /// </returns>
        public override bool Equals(object obj)
        {
            var that = obj as Group<T>;
            return (that != null) && (this.Title.Equals(that.Title));
        }

        /// <summary>
        /// Gets or sets Title.
        /// </summary>
        public string Title { get; set; }

        /// <summary>
        /// Gets or sets Items.
        /// </summary>
        public int Items { get; set; }
    }
}
